package com.thb.pay.mq.process;

import com.thb.pay.mq.utils.DetailRes;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import java.util.concurrent.Callable;

/**
 * @Author: lucky
 * @Descrpiton:
 * @Date: 9:59 2018/12/4
 * @Modify by:
 */
@AllArgsConstructor
@Slf4j
public class ProcessTask<T> implements Callable<DetailRes> {

    private T data;

    private MessageProcess<T> messageProcess;

    public DetailRes call() {
        return messageProcess.process(data);
    }
}
